import request from '@/utils/request'

// 查询消息管理列表
export function listMessage(query) {
  return request({
    url: '/oa/message/list',
    method: 'get',
    params: query
  })
}

// 获取个人消息提醒
export function listWaitingMessage() {
  return request({
    url: '/oa/message/waitingMessage',
    method: 'get'
  })
}

// 查询消息管理详细
export function getMessage(id) {
  return request({
    url: '/oa/message/' + id,
    method: 'get'
  })
}

// 新增消息管理
export function addMessage(data) {
  return request({
    url: '/oa/message',
    method: 'post',
    data: data
  })
}

// 修改消息管理
export function updateMessage(data) {
  return request({
    url: '/oa/message',
    method: 'put',
    data: data
  })
}

// 删除消息管理
export function delMessage(id) {
  return request({
    url: '/oa/message/' + id,
    method: 'delete'
  })
}

// 阅读消息
export function readMessage(id) {
  return request({
    url: '/oa/message/readMessage/' + id,
    method: 'post'
  })
}

// 批量阅读消息
export function batchReadMessage() {
  return request({
    url: '/oa/message/batchReadMessage',
    method: 'get'
  })
}

export function getAllHasAuth(data) {
  return request({
    url: '/oa/message/getAllHasAuth',
    method: 'get',
    params: data
  })
}

/**
 * 获取所有没有认证的正常用户
 * @returns {*}
 */
export function getAllNotAuth(data) {
  return request({
    url: '/oa/message/getAllNotAuth',
    method: 'get',
    params: data
  })
}

// 添加人脸
export function addface(data) {
  return request({
    url: '/workflow/FaceRecognition/faceset/addface',
    method: 'post',
    params: data
  })
}

// 根据userId删除人脸
export function removebyuserid(data) {
  return request({
    url: '/workflow/FaceRecognition/face/removebyuserid',
    method: 'post',
    params: data
  })
}
